<template>
  <el-card class="orderProcess" shadow="hover">
    <el-steps :active="active" align-center>
      <el-step title="提交订单" icon="el-icon-s-order"></el-step>
      <el-step title="确认支付" icon="el-icon-bank-card"></el-step>
      <el-step title="完成购买" icon="el-icon-success"></el-step>
    </el-steps>
    <br><br><br>
 <el-row>
  <el-button type="warning" @click="next">确认支付</el-button>
  </el-row>
  </el-card>
  
</template>



<script>
  import {
    findById
  } from "@/api/user";
  import {updatePayStatus} from "@/api/order";



  export default {
    data() {

      return {
        active:0,
        userId:'',
        orderId:'',
      };
    },

    created() {
      this.userId = this.$store.getters.userId;
      this.orderId = this.$route.query.orderId;
    },

    methods: {
      next() {
        updatePayStatus(this.orderId).then(res => {
          console.log(res);
          this.$router.push({
          name:'OrderProcess3'
        });
        })
      },
      
    },
  };

</script>

<style scoped>
  .orderProcess {
    width: 80%;
    border: solid rgb(174, 236, 221) 1px;
    border-radius: 4px;
    /* height: 15em; */
    margin-top: 40px;
    margin-left: 100px;
  }

  el-input {
    width: 200px;
  }

</style>
